# def findDiagonalOrder(matrix):
#
#     if not matrix:
#         return []
#     row, col = len(matrix),len(matrix[0])
#     ans = []
#     number = row * col
#     i = j = 0
#     up = True
#     while number:
#         number -= 1
#         ans.append(matrix[i][j])
#         if up:
#             if j == col - 1:
#                 i += 1
#                 up = False
#             elif i == 0:
#                 j += 1
#                 up = False
#             else:
#                 i -= 1
#                 j += 1
#         else:
#             if i == row - 1:
#                 up = True
#                 j += 1
#             elif j == 0:
#                 i += 1
#                 up = True
#             else:
#                 i += 1
#                 j -= 1
#     return ans
#
#
# print(findDiagonalOrder(([1,2,3],[4,5,6],[7,8,9])))

matrix = [[1,2,3,4,5,6,7,8,9,10],
          [11,12,13,14,15,16,17,18,19,20],
          [21,22,23,24,25,26,27,28,29,30],
          [31,32,33,34,35,36,37,38,39,40],
          [41,42,43,44,45,46,47,48,49,50],
          [51,52,53,54,55,56,57,58,59,60],
          [61,62,63,64,65,66,67,68,69,70],
          [71,72,73,74,75,76,77,78,79,80],
          [81,82,83,84,85,86,87,88,89,90],
          [91,92,93,94,95,96,97,98,99,100]]
# ans = []
# if not matrix:
#     print("[]")
# row,col = len(matrix),len(matrix[0])
# n = row * col
# i = j = 0
# up = 0
# m = 0
# s = 0
# while n:
#     n -= 1
#     ans.append(matrix[i][j])
#     if up != 1 and up != 2:
#         if j == col - 1:
#             if i == row - 1:
#                 i -= 1
#                 row -= 1
#                 up = 1
#             else:
#                 i += 1
#                 col -= 1
#                 up = 1
#                 m += 1
#         else:
#             j += 1
#     elif up != 0 and up != 2:
#         if i == row - 1:
#             j -= 1
#             row -= 1
#             up = 2
#             # s += 1
#         else:
#             i += 1
#     else:
#         if j == s:
#             i -= 1
#             if i == m:
#                 s +=1
#                 up = 0
#         else:
#             j -= 1
#
# print(ans)

# res = []
# while matrix:
#     res += matrix.pop(0)
#     matrix = list(map(list, zip(*matrix)))[::-1]
# print(res)
#
# a = 123
# b = str(a)
# print(int(b))
# c = map(lambda x:x+"c",b)
# print(list(c))

# s = ["h","e","l","l","o"]
# # b = enumerate(nums)
# # print(list(b))
# b =[]
# s.pop(2)
# print(s)
# print(b)

# nums = [2,3,1,2,4,3]
# s = 7
# for i in range(len(nums)-1):
#     if nums[i] + nums[i+1] == s:
#         print(nums[i:i+2])

# x = 121
# c = list(map(str,str(x)))
# b =list(map(int,str(x)))
# a = set(b)
# print(a)
# print(c)
x =1000021
a = list(map(str, str(x)))

for i in range(len(a) // 2):
    if a[i] != a[-1 - i]:
        c = False
        break
    else:
        c = True
print(c)
